﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PayTransfer.aspx.cs" Inherits="Yule8xWechat.Test.PayTransfer" %>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>网银支付</title>
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/comm.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/icon.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/my.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/agent.css" />
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        .weixin-tip {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            filter: alpha(opacity=80);
            height: 100%;
            width: 100%;
            z-index: 100;
        }

            .weixin-tip p {
                text-align: center;
                margin-top: 10%;
                padding: 0 5%;
            }
    </style>
</head>
<body>
    <script src="/Skin/Theme/Js/flexible_css.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/flexible.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/jquery_2.1.3.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Plugins/DialogLib/layer-v3.0.1/layer.js" type="text/javascript"></script>
    <div class="weixin-tip">
        <p>
            <img src="../Skin/Theme/Images/live_weixin.png" alt="微信打开" />
        </p>
    </div>
    <div class="content b-h">
        <form method="post" action="http://baifupay.34537.com/BankPayApi.aspx" onsubmit="return form_validate()">
            <div class="baseinfo">
                <ul>
                    <li>
                        <div class="basetext">
                            <span class="anametext">商品名称：</span><span class="anametext"><%=product_name %></span>
                        </div>
                    </li>
                    <li>
                        <div class="basetext">
                            <span class="anametext">支付金额：</span><span class="anametext"><%=order_amount %>元</span>
                        </div>
                    </li>
                    <li>
                        <div class="basetext">
                            <span class="anametext">银&nbsp;行&nbsp;卡&nbsp;：</span><span class="anameinput">
                                <select name="default_bank" required="required">
                                    <option value="ABC">中国农业银行</option>
                                    <option value="BJBANK">北京银行</option>
                                    <option value="BJRCB">北京农商银行</option>
                                    <option value="BOC">中国银行</option>
                                    <option value="CEB">中国光大银行</option>
                                    <option value="CIB">兴业银行</option>
                                    <option value="CITIC">中信银行</option>
                                    <option value="CMBC">中国民生银行</option>
                                    <option value="ICBC">中国工商银行</option>
                                    <option value="NBBANK">宁波银行</option>
                                    <option value="SDB">深圳发展银行</option>
                                    <option value="HXBANK">华夏银行</option>
                                    <option value="SPDB">浦发银行</option>
                                    <option value="PSBC">中国邮政储蓄银行</option>
                                    <option value="HZCB">杭州银行</option>
                                    <option value="NJCB">南京银行</option>
                                    <option value="COMM">交通银行</option>
                                    <option value="CMB">招商银行</option>
                                    <option value="CCB" selected="selected">中国建设银行</option>
                                    <option value="GDB">广发银行</option>
                                </select>
                            </span>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="regbutton">
                <span class="regbtn">
                    <button type="submit">立即支付</button></span>
            </div>
            <input type="hidden" name="subject" value="<%=product_name %>" />
            <input type="hidden" name="amount" value="<%=order_amount %>" />
            <input type="hidden" name="sign" value="<%=signstr %>" />
            <input type="hidden" name="out_trade_no" value="<%=out_trade_no %>" />
        </form>
    </div>
    <script type="text/javascript">
        $(window).on("load",function(){
	        var winHeight = $(window).height();
			function is_weixin() {
			    var ua = navigator.userAgent.toLowerCase();
			    if (ua.match(/MicroMessenger/i) == "micromessenger") {
			        return true;
			    } else {
			        return false;
			    }
			}
			var isWeixin = is_weixin();
			if(isWeixin){
				$(".weixin-tip").css("height",winHeight);
	            $(".weixin-tip").show();
			}
        })
    </script>
    <script>
        function form_validate() {
            if (!$('[name="default_bank"]').val()) {
                layer.msg('银行卡未选择!');
                return false;
            }
            if (!$('[name="amount"]').val() || !$('[name="sign"]').val() || !$('[name="out_trade_no"]').val()) {
                layer.msg('表单数据非法!');
                return false;
            }
            return true;
        }
    </script>
</body>
</html>
